###################################################################
# December 08 2016
# Replication file
# Rebecca Cordell
# "Measuring Extraordinary Rendition and International Cooperation"
# International Area Studies Review 2017 Vol. 20(2): 179-197
# DOI: 10.1177/2233865916687922
###################################################################

# Load Data 
rm(list=ls())
setwd("")
flight.data<-read.csv("flight.data.10082014.csv")

# Required Packages 
require(MatchIt)
require(RColorBrewer)
require(rworldmap)  
require(countrycode) 
require(rgeos)
require(cshapes)
require(geosphere)
require(caret)
require(klaR)
require(e1071)

###################################################################
# TABLE 3: RESULTS FROM MATCHING 
###################################################################
matching<-flight.data[,c(1,16,27,29,30,32,33)]
m.out1 <- matchit(known.rendition ~ detention.site + staging.post + rendition.aircraft + washington.dulles,
                  method = "exact", discard = "hull.both", data = matching)
exact.match <- match.data(m.out1)
summary(m.out1)
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# Sample sizes:
#  Control Treated
# All         10906(+10)      61
# Matched      1208(+10)      61
# Discarded    9698       0
#Matched sample sizes by subclass:
#  Treated Control Total
# 1      10      83    93
# 2      43     302(+5)   345(+5)
# 3       3     636(+5)   639(+5)
# 4       1      32    33
# 5       4     155   159
# Note: The subgroups in Cordell (2017) Table 3 are presented in order of importance to the theoretical argument.

###################################################################
# FIGURE 1: DISTRIBUTION OF FLIGHTS DURING EACH STAGE OF MATCHING
###################################################################
# EXTRACT DATA
stage0<-flight.data
stage1<-flight.data[flight.data$detention.site== 1,]
stage2<-stage1[stage1$staging.post== 1,]
stage3<-stage2[stage2$rendition.aircraft== 1,]
stage4<-stage3[stage3$washington.dulles== 1,]
stage0$year<-as.factor(stage0$year)
stage1$year<-as.factor(stage1$year)
stage2$year<-as.factor(stage2$year)
stage3$year<-as.factor(stage3$year)
stage4$year<-as.factor(stage4$year)
summary(stage0$year)
summary(stage1$year)
summary(stage2$year)
summary(stage3$year)
summary(stage4$year)
# CONSTRUCT DATA
matching.stages <- read.table(text = "2001   2002   2003   2004   2005   2006    2007   2008   2009   2010   2011   2012
                              Stage4 18 71 127 117 12 0 0 0 0 0 0 0 
                              Stage3 25 81 144 134 53 1 0 0 0 0 0 0
                              Stage2 28 142 194 186 139 173 44 0 0 0 0 0
                              Stage1 28 207 284 288 182 202 51 7 4 5 0 2
                              Stage0 228 1286 1807 1874 2212 1997 790 215 187 137 125 109", header = TRUE,check.names = FALSE)
# PLOT
fig1<-barplot(as.matrix(matching.stages),
              col = c("darkslategrey", "darkcyan", "mediumseagreen", "lightgreen", "lightyellow"), 
              legend.text=T, xlab="Year", ylab="Flights", font.main = 4,)
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# summary(stage0$year)
# 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 
# 228 1286 1807 1874(+10) 2212 1997  790  215  187  137  125  109 
# summary(stage1$year)
# 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2012 
# 28  207  284  288(+5)  182  202   51    7    4    5    2 
# summary(stage2$year)
# 2001 2002 2003 2004 2005 2006 2007 
# 28  142  194  186(+5)  139  173   44 
# summary(stage3$year)
# 2001 2002 2003 2004 2005 2006 
# 25   81  144  134(+5)   53    1 
# summary(stage4$year)
# 2001 2002 2003 2004 2005 
# 18   71  127  117(+5)   12 

###################################################################
# FIGURE 2: DISTRIBUTION OF IDENTIFIED RENDITION FLIGHTS 
###################################################################
# EXTRACT DATA
rendition.flight<-flight.data[flight.data$rendition.flight== 1,]
rendition.flight<-rendition.flight[,c(3)]    
rendition.year = table(rendition.flight)
rendition.year
# PLOT
colors = c("brown", "goldenrod", "darkolivegreen", "forestgreen", 
           "darkcyan") 
barplot(rendition.year,         
        col=colors, xlab="Year", ylab="Flights",font.main = 4,) 
legend("topleft", xjust=1, yjust=1,                              
       legend=c("Operation Enduring Freedom", "Presidential Authorisation", "Iraqi Detainee Transfer", "Release of the Torture Memos", "Secret Prisons Emptied"),            
       fill=c("brown", "goldenrod", "darkolivegreen", "forestgreen", 
              "darkcyan"))
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# rendition.year
# 2001 2002 2003 2004 2005 
# 18   71  127  122(+5)   12

###################################################################
# FIGURE 3: FREQUENCY OF RENDITION CIRCUITS 
###################################################################
# EXTRACT DATA
rendition.circ<-flight.data[flight.data$rendition.circ== 1,]
country.dep<-as.character(rendition.circ$dep.country)
country.arr<-as.character(rendition.circ$arr.country)
circ.country <- as.vector(rbind(country.dep,country.arr)) 
circ.country<-table(circ.country)
circ.country<-as.data.frame(circ.country)
colnames(circ.country)[colnames(circ.country) == "circ.country"] <- "country.name"
circ.country<-circ.country[circ.country$country.name!= "United States",]
circ.country<-circ.country[circ.country$country.name!= "NA's",]
circ.country
# PLOT
circ.country $ isocode <- countrycode(circ.country $ country.name, origin = "country.name", destination = "iso3c")
map.data <- joinCountryData2Map(        
  circ.country,                         
  joinCode = "ISO3",                    
  nameJoinColumn = "isocode",           
  verbose = TRUE)
colourPalette <- brewer.pal(7, "Oranges")
mapParams <- mapCountryData(map.data,                                 
                            nameColumnToPlot="Freq",
                            colourPalette=colourPalette,            
                            addLegend=FALSE,                            
                            catMethod="fixedWidth",                                                                  
                            missingCountryCol="white",
                            mapTitle="Frequency of Rendition Circuits", 
                            borderCol="black")                                                                      
do.call( addMapLegend, c(mapParams, legendWidth=0.5, legendMar = 2))  
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# circ.country
#                     country.name Freq
#                     Afghanistan   96
#                         Albania    2
#                         Algeria    8
#                         Austria    2
#                      Azerbaijan   11
#          Bosnia and Herzegovina    4
#                          Brazil    3
#  British Indian Ocean Territory    4
#                          Canada   11
#                           Cuba   27
#                         Cyprus   39
#                 Czech Republic   35
#                       Djibouti   11
#             Dominican Republic    1
#                          Egypt   50
#                       Ethiopia    1
#                         France    3
#                         Gambia    2
#                        Georgia    2
#                        Germany  141
#                         Greece   12
#                      Hong Kong    1
#                        Iceland    6
#                      Indonesia    2
#                           Iraq   28
#                        Ireland   91
#                          Italy    8(+5)
#                        Jamaica    1
#                          Japan    6
#                         Jordan   66
#                     Kazakhstan    1
#                          Kenya    4
#                         Kuwait    3
#                          Libya   20(+2)
#                          Malta    3
#                        Morocco   34(+3)
#                         Norway    2
#                       Pakistan   18
#                         Poland   24
#                       Portugal   43
#                          Qatar    1
#                        Romania   11
#                        Senegal    2
#                     Seychelles    2
#                    South Korea    2
#                          Spain   31(+4)
#                      Sri Lanka    4
#                         Sweden    2
#                     Tajikistan    3
#                       Thailand    8
#                        Tunisia    2
#                         Turkey   11
#       Turks and Caicos Islands    9
#           United Arab Emirates   23
#                 United Kingdom   86
#                     Uzbekistan   28
# Note: 12 flights in the data have an unassigned International Civil Aviation Organization (ICAO) code for either the departure or arrival airport and consequently have not been attributed to any country.

###################################################################
# FIGURE 4: EXAMPLE OF NEW RENDITION CIRCUITS 
###################################################################
# EXTRACT DATA
norway<-rendition.circ[rendition.circ$circ.id== 851,]
kazakhstan<-rendition.circ[rendition.circ$circ.id== 754,]
# CONSTRUCT DATA
norway1 <- read.table(text = "icao lat lon
                      KMIA 25.79325 -80.290556
                      MUGM 19.906458 -75.207056", header = TRUE)
norway2 <- read.table(text = "icao lat lon
                      MUGM 19.906458 -75.207056
                      EINN 52.701978 -8.924817", header = TRUE)
norway3 <- read.table(text = "icao lat lon
                      EINN 52.701978 -8.924817
                      OAKB 34.565853 69.212328", header = TRUE)
norway4 <- read.table(text = "icao lat lon
                      OAKB 34.565853 69.212328
                      ENBR 60.293386 5.218142", header = TRUE)
norway5 <- read.table(text = "icao lat lon
                      ENBR 60.293386 5.218142
                      KIAD 38.944533 -77.455811", header = TRUE)
kazakhstan1 <- read.table(text = "icao lat lon
                          KTEB 40.850103 -74.060837
                          CYYZ 43.677223 -79.630556", header = TRUE)
kazakhstan2 <- read.table(text = "icao lat lon
                          CYYZ 43.677223 -79.630556
                          KTEB 40.850103 -74.060837", header = TRUE)
kazakhstan3 <- read.table(text = "icao lat lon
                          KIAD 38.944533 -77.455811
                          EINN 52.701978 -8.924817", header = TRUE)
kazakhstan4 <- read.table(text = "icao lat lon
                          EINN 52.701978 -8.924817
                          ORBI 33.262539  44.234578", header = TRUE)
kazakhstan5 <- read.table(text = "icao lat lon
                          ORBI 33.262539  44.234578
                          UAAA 43.352072  77.040508", header = TRUE)
# PLOT
cshp(date=NA, useGW=TRUE)
wmap <- cshp(date=as.Date("2012-06-30"))
wmap_df <- fortify(wmap)
plot(wmap,col="#f2f2f2", fill=TRUE, bg="white", lwd=0.5)
points(norway1$lon,norway1$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(norway1)[1])) { 
  inter <- gcIntermediate(c(norway1$lon[1], norway1$lat[1]), c(norway1$lon[i], norway1$lat[i]), n=200)
  lines(inter, lwd=2, col="red")}
points(norway2$lon,norway2$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(norway2)[1])) { 
  inter <- gcIntermediate(c(norway2$lon[1], norway2$lat[1]), c(norway2$lon[i], norway2$lat[i]), n=200)
  lines(inter, lwd=2, col="red")}
points(norway3$lon,norway3$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(norway3)[1])) { 
  inter <- gcIntermediate(c(norway3$lon[1], norway3$lat[1]), c(norway3$lon[i], norway3$lat[i]), n=200)
  lines(inter, lwd=2, col="red")}
points(norway4$lon,norway4$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(norway4)[1])) { 
  inter <- gcIntermediate(c(norway4$lon[1], norway4$lat[1]), c(norway4$lon[i], norway4$lat[i]), n=200)
  lines(inter, lwd=2, col="red")}
points(norway5$lon,norway5$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(norway5)[1])) { 
  inter <- gcIntermediate(c(norway5$lon[1], norway5$lat[1]), c(norway5$lon[i], norway5$lat[i]), n=200)
  lines(inter, lwd=2, col="red")}
points(kazakhstan1$lon,kazakhstan1$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(kazakhstan1)[1])) { 
  inter <- gcIntermediate(c(kazakhstan1$lon[1], kazakhstan1$lat[1]), c(kazakhstan1$lon[i], kazakhstan1$lat[i]), n=200)
  lines(inter, lwd=2, col="blue")}
points(kazakhstan2$lon,kazakhstan2$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(kazakhstan2)[1])) { 
  inter <- gcIntermediate(c(kazakhstan2$lon[1], kazakhstan2$lat[1]), c(kazakhstan2$lon[i], kazakhstan2$lat[i]), n=200)
  lines(inter, lwd=2, col="blue")}
points(kazakhstan3$lon,kazakhstan3$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(kazakhstan3)[1])) { 
  inter <- gcIntermediate(c(kazakhstan3$lon[1], kazakhstan3$lat[1]), c(kazakhstan3$lon[i], kazakhstan3$lat[i]), n=200)
  lines(inter, lwd=2, col="blue")}
points(kazakhstan4$lon,kazakhstan4$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(kazakhstan4)[1])) { 
  inter <- gcIntermediate(c(kazakhstan4$lon[1], kazakhstan4$lat[1]), c(kazakhstan4$lon[i], kazakhstan4$lat[i]), n=200)
  lines(inter, lwd=2, col="blue")}
points(kazakhstan5$lon,kazakhstan5$lat, pch=3, cex=0.1, col="chocolate1")
for (i in (1:dim(kazakhstan5)[1])) { 
  inter <- gcIntermediate(c(kazakhstan5$lon[1], kazakhstan5$lat[1]), c(kazakhstan5$lon[i], kazakhstan5$lat[i]), n=200)
  lines(inter, lwd=2, col="blue")}
# Note: The latitude and longitude coordinate data used for this figure are from the Openflights Airports Database: https://openflights.org/data.html

###################################################################
# TABLE 4. ESTIMATING MODEL ACCURACY WITH 10 X REPEATED K-FOLD CROSS-VALIDATION USING NAIVE BAYES. 
###################################################################
# PREPARE DATA 
flight.data$rendition.flight<-as.factor(flight.data$rendition.flight)
flight.data$known.rendition<-as.factor(flight.data$known.rendition)
flight.data$non.rendition<-as.factor(flight.data$non.rendition)
# MODEL 1
train.control <- trainControl(method="repeatedcv", number=10, repeats=10)
model1 <- train(known.rendition~rendition.flight, data=flight.data, trControl=train.control, method="nb")
print(model1)
# MODEL 2
train.control <- trainControl(method="repeatedcv", number=10, repeats=10)
model2 <- train(non.rendition~rendition.flight, data=flight.data, trControl=train.control, method="nb")
print(model2)
# MODEL 2 ZERO VARIATION - CORRECTLY PREDICTS 100% OF NON-RENDITION FLIGHTS
non.rendition<-flight.data[flight.data$non.rendition==1,]
summary(non.rendition$rendition.flight)
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). 

###################################################################
# APPENDIX 3. COUNTRY LIST OF RENDITION FLIGHTS.
###################################################################
# EXTRACT FLIGHT FREQUENCY DATA
rendition.flight<-flight.data[flight.data$rendition.flight== 1,]
country.dep<-as.character(rendition.flight$dep.country)
country.arr<-as.character(rendition.flight$arr.country)
rendition.country <- as.vector(rbind(country.dep,country.arr)) 
rendition.country<-table(rendition.country)
rendition.country<-as.data.frame(rendition.country)
colnames(rendition.country)[colnames(rendition.country) == "rendition.country"] <- "country.name"
rendition.country
# rendition.country
#               rendition.country Freq
#                     Afghanistan   96
#                         Albania    2
#                         Algeria    3
#                      Azerbaijan    4
#          Bosnia and Herzegovina    4
#  British Indian Ocean Territory    3
#                            Cuba   27
#                          Cyprus   18
#                  Czech Republic   14
#                       Djibouti   11
#             Dominican Republic    1
#                          Egypt   47
#                       Ethiopia    1
#                         France    1
#                         Gambia    2
#                        Georgia    1
#                        Germany   64
#                         Greece    6
#                      Indonesia    1
#                           Iraq   28
#                        Ireland   21
#                          Italy    3(+3)
#                          Japan    2
#                         Jordan   65
#                     Kazakhstan    1
#                          Kenya    4
#                         Kuwait    1
#                          Libya   20(+2)
#                          Malta    1
#                        Morocco   34(+3)
#                         Norway    1
#                       Pakistan   17
#                         Poland   20
#                       Portugal   21
#                        Romania    8
#                        Senegal    1
#                     Seychelles    2
#                    South Korea    1
#                          Spain   14(+2)
#                      Sri Lanka    3
#                         Sweden    2
#                       Thailand    6
#                        Tunisia    2
#                         Turkey    3
#       Turks and Caicos Islands    6
#           United Arab Emirates   15
#                 United Kingdom   28
#                  United States   26
#                     Uzbekistan   28
# EXTRACT YEAR DATA
rendition.flight<-flight.data[flight.data$rendition.flight== 1,]
y2001<-rendition.flight[rendition.flight$year== 2001,]
y2002<-rendition.flight[rendition.flight$year== 2002,]
y2003<-rendition.flight[rendition.flight$year== 2003,]
y2004<-rendition.flight[rendition.flight$year== 2004,]
y2005<-rendition.flight[rendition.flight$year== 2005,]
year.dep1<-as.character(y2001$dep.country)
year.arr1<-as.character(y2001$arr.country)
year.dep2<-as.character(y2002$dep.country)
year.arr2<-as.character(y2002$arr.country)
year.dep3<-as.character(y2003$dep.country)
year.arr3<-as.character(y2003$arr.country)
year.dep4<-as.character(y2004$dep.country)
year.arr4<-as.character(y2004$arr.country)
year.dep5<-as.character(y2005$dep.country)
year.arr5<-as.character(y2005$arr.country)
country.year1 <- as.vector(rbind(year.dep1,year.arr1))
country.year2 <- as.vector(rbind(year.dep2,year.arr2))
country.year3 <- as.vector(rbind(year.dep3,year.arr3))
country.year4 <- as.vector(rbind(year.dep4,year.arr4))
country.year5 <- as.vector(rbind(year.dep5,year.arr5))
country.year1<-as.data.frame(country.year1)
country.year2<-as.data.frame(country.year2)
country.year3<-as.data.frame(country.year3)
country.year4<-as.data.frame(country.year4)
country.year5<-as.data.frame(country.year5)
country.year1 <- country.year1[!duplicated(country.year1$country.year1),]
country.year2 <- country.year2[!duplicated(country.year2$country.year2),]
country.year3 <- country.year3[!duplicated(country.year3$country.year3),]
country.year4 <- country.year4[!duplicated(country.year4$country.year4),]
country.year5 <- country.year5[!duplicated(country.year5$country.year5),]
# View(country.year1)
# View(country.year2)
# View(country.year3)
# View(country.year4)
# View(country.year5)
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# Country Frequency Year (minimum) Year (maximum)
# Italy   Minimum   2002            2003(not 2004)
###################################################################
# APPENDIX 4. COUNTRY LIST OF RENDITION CIRCUITS.
###################################################################
# EXTRACT FLIGHT FREQUENCY DATA
rendition.circ<-flight.data[flight.data$rendition.circ== 1,]
country.dep<-as.character(rendition.circ$dep.country)
country.arr<-as.character(rendition.circ$arr.country)
circ.country <- as.vector(rbind(country.dep,country.arr)) 
circ.country<-table(circ.country)
circ.country<-as.data.frame(circ.country)
colnames(circ.country)[colnames(circ.country) == "circ.country"] <- "country.name"
circ.country<-circ.country[circ.country$country.name!= "NA's",]
circ.country
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# circ.country
#                     country.name Freq
#                     Afghanistan   96
#                         Albania    2
#                         Algeria    8
#                         Austria    2
#                      Azerbaijan   11
#          Bosnia and Herzegovina    4
#                          Brazil    3
#  British Indian Ocean Territory    4
#                          Canada   11
#                           Cuba   27
#                         Cyprus   39
#                 Czech Republic   35
#                       Djibouti   11
#             Dominican Republic    1
#                          Egypt   50
#                       Ethiopia    1
#                         France    3
#                         Gambia    2
#                        Georgia    2
#                        Germany  141
#                         Greece   12
#                      Hong Kong    1
#                        Iceland    6
#                      Indonesia    2
#                           Iraq   28
#                        Ireland   91
#                          Italy    8(+5)
#                        Jamaica    1
#                          Japan    6
#                         Jordan   66
#                     Kazakhstan    1
#                          Kenya    4
#                         Kuwait    3
#                          Libya   20(+2)
#                          Malta    3
#                        Morocco   34(+3)
#                         Norway    2
#                       Pakistan   18
#                         Poland   24
#                       Portugal   43
#                          Qatar    1
#                        Romania   11
#                        Senegal    2
#                     Seychelles    2
#                    South Korea    2
#                          Spain   31(+4)
#                      Sri Lanka    4
#                         Sweden    2
#                     Tajikistan    3
#                       Thailand    8
#                        Tunisia    2
#                         Turkey   11
#       Turks and Caicos Islands    9
#           United Arab Emirates   23
#                 United Kingdom   86
#                   United States  464(+6)
#                     Uzbekistan   28
# Note: 12 flights in the data have an unassigned International Civil Aviation Organization (ICAO) code for either the departure or arrival airport and consequently have not been attributed to any country.
# EXTRACT YEAR DATA
rendition.circ<-flight.data[flight.data$rendition.circ== 1,]
circ2001<-rendition.circ[rendition.circ$year== 2001,]
circ2002<-rendition.circ[rendition.circ$year== 2002,]
circ2003<-rendition.circ[rendition.circ$year== 2003,]
circ2004<-rendition.circ[rendition.circ$year== 2004,]
circ2005<-rendition.circ[rendition.circ$year== 2005,]
circ.dep1<-as.character(circ2001$dep.country)
circ.arr1<-as.character(circ2001$arr.country)
circ.dep2<-as.character(circ2002$dep.country)
circ.arr2<-as.character(circ2002$arr.country)
circ.dep3<-as.character(circ2003$dep.country)
circ.arr3<-as.character(circ2003$arr.country)
circ.dep4<-as.character(circ2004$dep.country)
circ.arr4<-as.character(circ2004$arr.country)
circ.dep5<-as.character(circ2005$dep.country)
circ.arr5<-as.character(circ2005$arr.country)
country.circ1 <- as.vector(rbind(circ.dep1,circ.arr1))
country.circ2 <- as.vector(rbind(circ.dep2,circ.arr2))
country.circ3 <- as.vector(rbind(circ.dep3,circ.arr3))
country.circ4 <- as.vector(rbind(circ.dep4,circ.arr4))
country.circ5 <- as.vector(rbind(circ.dep5,circ.arr5))
circ.year1<-as.data.frame(country.circ1)
circ.year2<-as.data.frame(country.circ2)
circ.year3<-as.data.frame(country.circ3)
circ.year4<-as.data.frame(country.circ4)
circ.year5<-as.data.frame(country.circ5)
circ.year1 <- circ.year1[!duplicated(circ.year1$country.circ1),]
circ.year2 <- circ.year2[!duplicated(circ.year2$country.circ2),]
circ.year3 <- circ.year3[!duplicated(circ.year3$country.circ3),]
circ.year4 <- circ.year4[!duplicated(circ.year4$country.circ4),]
circ.year5 <- circ.year5[!duplicated(circ.year5$country.circ5),]
# View(circ.year1)
# View(circ.year2)
# View(circ.year3)
# View(circ.year4)
# View(circ.year5)
# Note: One classified rendition circuit (10 individual flights) that has not yet been made public has been removed from the data. 
# This produces slightly different results to those presented in Cordell (2017). For example:
# Country Frequency Year (minimum) Year (maximum)
# Italy   Minimum   2002            2003(not 2004)
# Note: 12 flights in the data have an unassigned International Civil Aviation Organization (ICAO) code for either the departure or arrival airport and consequently have not been attributed to any country.